package com.atguigu.lease.common.context;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Map;
@Component
public class MyContext implements WebMvcConfigurer {
    @Autowired
    LoginUserContex loginUserContex;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginUserContex).addPathPatterns("/**");

    }
}
